#pragma once
#include<iostream>
#include"Connection.hpp"
#include"protocol.hpp"


using namespace protocol_ns;
class PackageParse
{
    public:
    static void Parse(Connection *conn)
    {
        std::string package;
        ::Request req;
        while (true)
        {
            std::cout<<conn->Inbuffer()<<std::endl;
            conn->AppendOutbuffer(conn->Inbuffer());
            break;
        }
        if(!conn->OutbufferEmptr()&&conn->_sender!=nullptr)
        {
            conn->_sender(conn);
        }
        
    }
};